[gd_scene load_steps=10 format=2]

[ext_resource path="res://assets/space_env.tres" type="Environment" id=1]
[ext_resource path="res://camera.gd" type="Script" id=2]
[ext_resource path="res://planet.gd" type="Script" id=3]
[ext_resource path="res://resources/planets/planet/planet.tres" type="Material" id=4]
[ext_resource path="res://assets/sun.png" type="Texture" id=5]
[ext_resource path="res://resources/planets/planet/newplanet.obj" type="ArrayMesh" id=6]
[ext_resource path="res://resources/planets/planet_2/planet.tres" type="Material" id=7]
[ext_resource path="res://gui.gd" type="Script" id=8]
[ext_resource path="res://Sun.gd" type="Script" id=9]

[node name="Spatial" type="Spatial"]

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource( 1 )

[node name="OmniLight" type="OmniLight" parent="."]
light_energy = 3.0
omni_range = 500000.0
omni_attenuation = 4.28709

[node name="Sun" type="Sprite3D" parent="."]
transform = Transform( 1400, 0, 0, 0, 1400, 0, 0, 0, 1400, 0, 0, 0 )
billboard = 1
texture = ExtResource( 5 )
region_rect = Rect2( 64, 64, 128, 128 )
script = ExtResource( 9 )

[node name="planet1" type="Spatial" parent="Sun"]
transform = Transform( 0.000714286, 0, 0, 0, 0.000714286, 0, 0, 0, 0.000714286, 0, 0, 0 )
script = ExtResource( 3 )
semimajor_axis = 50000
semiminor_axis = 20000
angle_of_apoapsis = 78
xtilt = 15
ytilt = 5
color = Color( 1, 0, 1, 1 )

[node name="planet1" type="MeshInstance" parent="Sun/planet1"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 7 )

[node name="camera" type="Spatial" parent="Sun/planet1/planet1"]
script = ExtResource( 2 )

[node name="helper" type="Spatial" parent="Sun/planet1/planet1/camera"]

[node name="real_camera" type="InterpolatedCamera" parent="Sun/planet1/planet1/camera/helper"]
far = 500000.0
target = NodePath("../target")
speed = 3.0
enabled = true

[node name="target" type="Spatial" parent="Sun/planet1/planet1/camera/helper"]

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="Sun/planet1"]

[node name="planet2" type="Spatial" parent="Sun"]
transform = Transform( 0.000714286, 0, 0, 0, 0.000714286, 0, 0, 0, 0.000714286, 0, 0, 0 )
script = ExtResource( 3 )
semiminor_axis = 80000
color = Color( 0, 1, 1, 1 )

[node name="planet2" type="MeshInstance" parent="Sun/planet2"]
mesh = ExtResource( 6 )
material/0 = ExtResource( 4 )

[node name="ImmediateGeometry" type="ImmediateGeometry" parent="Sun/planet2"]

[node name="Control" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
script = ExtResource( 8 )
__meta__ = {
"_edit_use_anchors_": false
}

[node name="CanvasLayer" type="CanvasLayer" parent="Control"]

[node name="HSlider" type="HSlider" parent="Control/CanvasLayer"]
anchor_left = 1.0
anchor_right = 1.0
margin_left = -220.0
margin_top = 20.0
margin_right = -20.0
margin_bottom = 50.0
max_value = 6.0
tick_count = 7
__meta__ = {
"_edit_use_anchors_": false
}

[node name="Label" type="Label" parent="Control/CanvasLayer/HSlider"]
margin_top = -17.0
margin_right = 196.0
margin_bottom = -3.0
text = "Timewarp!"
align = 1
__meta__ = {
"_edit_use_anchors_": false
}

[node name="ItemList" type="ItemList" parent="Control/CanvasLayer"]
margin_right = 70.0
margin_bottom = 95.0
__meta__ = {
"_edit_use_anchors_": false
}
[connection signal="camera_change" from="Control" to="Sun/planet1/planet1/camera" method="_on_Control_camera_change"]
[connection signal="value_changed" from="Control/CanvasLayer/HSlider" to="Control" method="_on_HSlider_value_changed"]
[connection signal="item_selected" from="Control/CanvasLayer/ItemList" to="Control" method="_on_ItemList_item_selected"]
